package com.suibibk.springCloud.stock.controller;

import com.suibibk.springCloud.stock.service.StockService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/stock")
public class StockController {
    @Autowired
    StockService stockService;
    @RequestMapping("/reduce")
    public String reduce(Long merchId){
        stockService.reduce(merchId);
        return "库存扣减成功";
    }
}
